﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.Unity;

using ERPStore.Extensions;

namespace ERPStore.Tasks.EventConsumers
{
	public class ApplicationStartedEventConsumer : EventBrokR.IConsumer<ERPStore.Events.ApplicationStartedEvent>
	{
		public void Handle(Events.ApplicationStartedEvent eventMessage)
		{
			var worker = GlobalConfiguration.Configuration.DependencyResolver.GetService<ERPStore.Services.IScheduledTaskService>();
			worker.Start();
		}
	}
}
